﻿using CocoaAni.Net.WebSockets.Server.Controllers;
using System.Runtime.Serialization;

namespace CocoaAni.Net.WebSockets.Server.Exceptions;

public class WebSocketControllerException : Exception
{
    public WebSocketControllerException(WebSocketController controller)
    {
        Controller = controller;
    }

    protected WebSocketControllerException(SerializationInfo info, StreamingContext context, WebSocketController controller) : base(info, context)
    {
        Controller = controller;
    }

    public WebSocketControllerException(string? message, WebSocketController controller) : base(message)
    {
        Controller = controller;
    }

    public WebSocketControllerException(string? message, Exception? innerException, WebSocketController controller) : base(message, innerException)
    {
        Controller = controller;
    }

    public WebSocketController? Controller { get; }
}